home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
TPUG - Toronto PET Users Group
/
TPUG Users Group CD
/
TPUG Users Group CD.iso
/
C64
/
G-Games
/
(c)gb.d64
/
3 of a kind.c
(
.txt
)
< prev
next >
Wrap
Commodore BASIC
|
2007-02-04
|
3KB
|
92 lines
0 REM**CONVERTED TO THE C64 AND BY ROGERD BURGE,#2667
1 REM**TORONTO PET USERS GROUP,CANADA
10 GOTO9000:REM M. RICHTER 90064 MAY 81
100 REM SET UP DISPLAY
110 U=NW(3):P$=N$:Y$=N$:W$=W0$:PRINT"[147] # WORD YOU C64
120 [153]" STR$ STR$STR$STR$STR$ STR$STR$STR$STR$ STR$STR$STR$STR$
130 FORI=1TO9:PRINTI;W$(I)"":NEXTI:GOTO5900
1000 U=1:REM VIC'S PLAY
1010 FORI=0TO3:IFP%(1,I)>0THENNEXTI
1020 I=I-1:IFI<1GOTO1500
1050 FORJ=0TOI-1:FORK=J+1TOI:V=P%(1,I)+P%(1,J):IFV>14ORV<6GOTO1100
1060 X=FNN(15-V):IFFNW(X)GOTO1900
1100 IFV<15GOTO1200
1110 X=FNN(24-V):IFFNW(X)GOTO1900
1200 NEXTK:NEXTJ
1500 REM CHECK FOR BLOCK
1510 FORI=0TO3:IFP%(0,I)THENNEXTI
1520 I=I-1:IFI<1GOTO1800
1530 FORJ=0TOI-1:FORK=J+1TOI:V=P%(0,I)+P%(0,J):IFV>14ORV<6GOTO1600
1540 X=FNN(15-V):IFFNW(X)GOTO1900
1600 IFV<15GOTO1700
1610 X=FNN(24-V):IFFNW(X)GOTO1900
1700 NEXTK:NEXTJ
1800 REM NO OBVIOUS PLAY
1850 X=1+INT(9*RND(1)):IFFNW(X)=0GOTO1850
1900 J=0:K=0:PRINT"YOUR 64 PLAYS"X:T=TI
1910 IFTI-T<30GOTO1910
1920 GOTO5000
2000 U=0:REM YOUR PLAY
2010 PRINT"WHICH #? "B4$D4$;
2020 GOSUB4000:X=VAL(C$):IFX<1ORVAL(MID$(W$,(X-(X=.)),1))=0GOTO2020
2040 PRINTX:GOTO5000
3800 GOSUB4000:IFC$="Y"ORC$="N"THENRETURN
3810 GOTO3800
3990 PRINT"HIT A KEY TO CONTINUE"
4000 GETC$:IFC$>""GOTO4000
4010 GETC$:IFC$=""GOTO4010
4020 RETURN
5000 REM PUT WORD IN RIGHT COLUMN
5010 PRINTLEFT$(L$,2*X):PRINTB7$W$(X);:Y$=D5$+" "+W$(X)
5020 FORI=0TO3:IFP%(U,I)THENNEXTI
5030 I=I:P%(U,I)=FNW(X):V=1+2*X
5040 IFV<18THENFORJ=VTO18:PRINTD4$B4$""D4$W$(X);:NEXTJ
5060 W$=LEFT$(W$,X-1)+"0"+MID$(W$,X+1)
5100 V=4+5*U:FORJ=1TOV:PRINT" "Y$;:NEXTJ
5110 V=3+2*I:FORJ=18TOVSTEP-1:PRINTD4$B4$"[145]"Y$;:NEXTJ
5200 REM CHECK FOR A WIN
5210 IFP%(U,2)=0GOTO5900
5220 V=P%(U,I):FORJ=0TOI-2
5230 FORK=J+1TOI-1:W=V+P%(U,J)+P%(U,K):IFW=15ORW=24GOTO5300
5240 NEXTK:NEXTJ:IFI<4GOTO5900
5250 X$="TIE GAME":NW(2)=NW(2)+1:GOTO5550
5300 REM
5500 REM GAME ENDS
5510 NW(U)=NW(U)+1:X$="YOU WIN!":IFUTHENX$="YOUR 64 WINS"
5550 PRINTL$BL$:PRINT" "X$" [146] ";:T=TI
5555 IFTI-T<60GOTO5555
5560 PRINT" ANOTHER? ";:GOSUB3800:IFC$="N"GOTO6000
5570 PRINTC$:FORI=0TO4:P%(0,I)=0:P%(1,I)=0:NEXT:GOTO100
5900 PRINTL$BL$:ON1+UGOTO1000,2000
6000 REM WRAPUP
6010 PRINT"[147]IN THIS SERIES,
6020 [153]"YOU WON"NW(0)
6030 [153]"YOUR 64 WON"NW(1)
6040 [153]"AND YOU HAD"NW(2)"TIE";:[139]NW(2)[179][177]1[167][153]"S"
6050 [153]"PLAY AGAIN? (Y/N)
6055 GETA$:IFA$=""THEN6055
6060 IFA$="Y"THENRUN
6065 IFA$="N"THENPRINT"[147]":END
6070 GOTO6055
9000 REM GAME SOURCE: DAVID SILVERMAN
9010 N$="000000000":B4$=" ":D5$="[157][157][157][157][157]":D4$="[157][157][157][157]
9020 L$[178]" ONON":B7$[178]" ":[151]53281,3:[151]53280,3
9030 [134]P%(1,4),NW(4):L$[178]"":NW(4)[178]3[172][187]([171]1[173]TI)
9050 [150][165]W(I)[178][197]([202](W$,I,1)):[150][165]N(I)[178][197]([202](N$,I,1))
9060 [129]J[178]0[164]NW(4):[135]W0$:[129]I[178]1[164]9:[135]W$(I):[130]I:[135]N$:[130]J
9100 [143] INSTRUCTIONS
9110 [153]"LOADSTOP THREE OF A KIND "[199](142)
9120 [153]"YOUR 64 WILL GIVE YOU A LIST OF 9 WORDS, FROM
9130 PRINT"WHICH YOU AND YOUR 64 PICK ALTERNATELY.
9140 [153]"THE OBJECT IS TO GET THREE WORDS WHICH
9150 PRINT"CONTAIN THE SAME LETTER.":GOSUB3990
9160 PRINT"[147]FOR EXAMPLE, IF YOU GET:":PRINT" MAS[146]T S[146]KIP S[146]LOW[144]
9170 [153]"YOU WOULD WIN, SINCE EACH HAS AN 'S'.
9180 FORI=0TO2:NW(I)=0:NEXT
9200 PRINT" WILL YOU GO FIRST? ":GOSUB3800
9210 NW(3)=-(C$="Y"):NW(4)=INT(3*RND(1)):GOTO100
10000 DATA973642581,FIRE,HOSE,MAST,PLOW,PRAY,ROCK,SKIP,WAKE,WIND,963574281
10010 DATA361492857,CASK,CROP,DRUM,LOAN,MINT,PEND,RATE,SOME,TIPS,361482975
10020 DATA137294586,BUNT,GIRL,HAIL,HOME,MOAN,ROWS,SINE,TEAR,THUS,142679385
10100 REM FIRST NUMBER IS "MAGIC SQUARE", SECOND IS ITS INVERSE